package com.example.timyag;

import com.spring4all.swagger.EnableSwagger2Doc;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
@EnableSwagger2Doc
@MapperScan("com.example.timyag.dao.mapper")
public class SpringBootDemoApplication {

    public static void main(String[] args) throws ClassNotFoundException {
        ClassLoader c = SpringBootDemoApplication.class.getClassLoader();
        System.out.println(c);
        System.out.println(c.getParent());

        System.out.println("system classloader :" + ClassLoader.getSystemClassLoader());
        try {
            c.getParent().loadClass("com.example.timyag.SpringBootDemoApplication");
        } catch (ClassNotFoundException ex) {
            System.out.println("can not find class：" + ex.getMessage());
        } catch (Exception ex) {
            System.out.println("error:" + ex.getMessage());
        }

        System.out.println(System.getProperty("java.class.path"));
        SpringApplication.run(SpringBootDemoApplication.class, args);
    }
}
